#include <string.h> 
#include <stdio.h>

/*
* I_3.c
*
*  Created on: April, 9, 2009
*      Author: yimingliu@fudan.edu.cn
*/

void funI_3()
{
	char str[100]; 
	int i,n,uppercase=0, lowercase=0, digital=0,blank=0,other=0; 
	printf("please input the string:\n"); 
	gets(str); 
	n=strlen(str);
	for(i=0;i<n;i++) 
	{
		if(str[i]>='a'&&str[i]<='z')
		{
			lowercase++;
		}
		else if(str[i]>='A'&&str[i]<='Z')
		{
			uppercase++;
		}
		else if(str[i]==' ')
		{
			blank++;
		}
		else if(str[i]>='0'&&str[i]<='9')
		{
			digital++;
		}
		else 
		{
			other++;
		}
	}
	printf("uppercase %d\n",uppercase);
	printf("lowercase %d\n",lowercase);
	printf("blank %d\n",blank);
	printf("digital %d\n",digital);
	printf("other %d\n",other);
}